package cn.campus.pojo.article.dto;

import lombok.Data;

import java.util.List;

/**
 * 分页信息类
 * Created by linyanbin on 2018/9/22.
 */
@Data
public class PageInfo<T> {
    private int currentPage;    // 当前页
    private int pageSize;   // 没页记录数
    private int totalPage;  // 总页数
    private long count; // 总记录数
    private List<T> list;

    public PageInfo() {
    }

    public PageInfo(List<T> list) {
        this.list = list;
    }

    public PageInfo(List<T> list, int currentPage, int pageSize) {
        this.list = list;
        this.currentPage = currentPage;
        this.pageSize = pageSize;
    }

    public PageInfo(int currentPage, int pageSize) {
        this.currentPage = currentPage;
        this.pageSize = pageSize;
    }
}
